﻿using DapperExtensions;
using DapperExtensions.Mapper;
using DapperExtensions.Sql;
using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;

namespace Common.Library.Db.DapperHelper
{
    public class SqlServerBaseFixture
    {
        protected IDatabase Db;
        public SqlServerBaseFixture(string dbconn)
        {
            var connection = new SqlConnection(dbconn);
            var config = new DapperExtensionsConfiguration(typeof(AutoClassMapper<>), new List<Assembly>(), new SqlServerDialect());
            var sqlGenerator = new SqlGeneratorImpl(config);
            Db = new Database(connection, sqlGenerator);
        }


    }
}
